/* 
 * 虚拟银行系统 - 贷款服务页面样式
 */

/* 贷款标签页样式 */
.loan-tabs {
  display: flex;
  border-bottom: 1px solid var(--divider-color);
  margin-bottom: var(--spacing-lg);
}

.loan-tab {
  padding: var(--spacing-md) var(--spacing-lg);
  cursor: pointer;
  color: var(--text-color);
  position: relative;
  transition: all 0.3s;
}

.loan-tab.active {
  color: var(--primary-color);
  font-weight: 500;
}

.loan-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.loan-tab:hover {
  color: var(--primary-color);
}

.loan-content {
  display: none;
  animation: fadeIn 0.3s;
}

.loan-content.active {
  display: block;
}

/* 贷款产品列表样式 */
.loan-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.loan-product-card {
  background-color: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.loan-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.loan-product-header {
  background-color: var(--primary-color);
  color: white;
  padding: var(--spacing-md);
  text-align: center;
}

.loan-product-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.loan-product-subtitle {
  font-size: 12px;
  opacity: 0.8;
}

.loan-product-body {
  padding: var(--spacing-md);
}

.loan-product-rate {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.loan-product-rate-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent-color);
}

.loan-product-rate-label {
  font-size: 12px;
  color: var(--light-text);
}

.loan-product-features {
  margin-bottom: var(--spacing-md);
}

.loan-product-feature {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
}

.loan-product-feature-icon {
  margin-right: var(--spacing-sm);
  color: var(--success-color);
  flex-shrink: 0;
  margin-top: 3px;
}

.loan-product-footer {
  padding: var(--spacing-md);
  text-align: center;
  border-top: 1px solid var(--divider-color);
}

/* 贷款记录样式 */
.loan-records .empty-state {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--light-text);
}

.loan-record-item {
  background-color: white;
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.loan-record-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--divider-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.loan-record-title {
  font-weight: 500;
  display: flex;
  align-items: center;
}

.loan-record-status {
  padding: 2px var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  margin-left: var(--spacing-sm);
}

.loan-record-status.pending {
  background-color: #FFF7E6;
  color: #FA8C16;
}

.loan-record-status.approved {
  background-color: #F6FFED;
  color: #52C41A;
}

.loan-record-status.rejected {
  background-color: #FFF1F0;
  color: #F5222D;
}

.loan-record-status.completed {
  background-color: #E6F7FF;
  color: #1890FF;
}

.loan-record-no {
  color: var(--light-text);
  font-size: 12px;
}

.loan-record-body {
  padding: var(--spacing-md);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

.loan-record-item-group {
  display: flex;
  flex-direction: column;
}

.loan-record-label {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 4px;
}

.loan-record-value {
  font-weight: 500;
}

.loan-record-footer {
  padding: var(--spacing-md);
  border-top: 1px solid var(--divider-color);
  text-align: right;
}

/* 贷款申请表单样式 */
.loan-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.loan-steps {
  display: flex;
  margin-bottom: var(--spacing-lg);
}

.loan-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.loan-step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: var(--divider-color);
}

.loan-step:last-child::after {
  display: none;
}

.loan-step-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--divider-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin: 0 auto var(--spacing-sm);
  position: relative;
  z-index: 1;
}

.loan-step.active .loan-step-icon {
  background-color: var(--primary-color);
}

.loan-step.completed .loan-step-icon {
  background-color: var(--success-color);
}

.loan-step-text {
  font-size: 12px;
  color: var(--light-text);
}

.loan-step.active .loan-step-text {
  color: var(--primary-color);
  font-weight: 500;
}

.loan-step.completed .loan-step-text {
  color: var(--success-color);
}

.loan-step-content {
  display: none;
}

.loan-step-content.active {
  display: block;
}

.loan-calculator {
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--divider-color);
  border-radius: var(--border-radius-lg);
  background-color: rgba(255,255,255,0.8);
  padding: var(--spacing-md);
}

.loan-calculator-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--divider-color);
  display: flex;
  align-items: center;
}

.loan-calculator-icon {
  margin-right: var(--spacing-sm);
  color: var(--primary-color);
}

.loan-calculator-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px dashed var(--divider-color);
}

.loan-calculator-result-item {
  text-align: center;
}

.loan-calculator-result-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--title-color);
  margin-bottom: 4px;
}

.loan-calculator-result-label {
  font-size: 12px;
  color: var(--light-text);
}

.loan-form-footer {
  margin-top: var(--spacing-lg);
  text-align: center;
}

/* 贷款详情与还款计划 */
.loan-detail-header {
  background-color: white;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--card-shadow);
}

.loan-detail-title {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.loan-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(26, 58, 143, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-md);
  color: var(--primary-color);
  font-size: 18px;
}

.loan-detail-status {
  margin-left: auto;
}

.loan-detail-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
}

.loan-detail-item {
  display: flex;
  flex-direction: column;
}

.loan-detail-label {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 4px;
}

.loan-detail-value {
  font-size: 16px;
  font-weight: 500;
}

.repayment-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.repayment-plan-table {
  width: 100%;
  border-collapse: collapse;
}

.repayment-plan-table th,
.repayment-plan-table td {
  padding: var(--spacing-sm) var(--spacing-md);
  text-align: left;
  border-bottom: 1px solid var(--divider-color);
}

.repayment-plan-table th {
  background-color: rgba(0, 0, 0, 0.02);
  font-weight: 500;
}

.repayment-plan-table tr:last-child td {
  border-bottom: none;
}

.repayment-plan-table tr:hover td {
  background-color: rgba(0, 0, 0, 0.01);
}

.repayment-status {
  padding: 2px var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  display: inline-block;
}

/* 响应式设计 */
@media (max-width: 991px) {
  .loan-record-body {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .loan-detail-info {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .loan-products {
    grid-template-columns: 1fr;
  }
  
  .loan-tabs {
    flex-wrap: wrap;
  }
  
  .loan-tab {
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .loan-calculator-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .loan-record-body {
    grid-template-columns: 1fr;
  }
  
  .loan-detail-info {
    grid-template-columns: 1fr;
  }
}
